package com.zhiy.com.estation.ui.fragment.login;

import com.zhiy.com.estation.model.User;
import com.zhiy.com.estation.api.ApiResult;
import com.zhiy.com.estation.ui.base.BaseModel;
import com.zhiy.com.estation.ui.base.BasePresenter;
import com.zhiy.com.estation.ui.base.BaseView;

import io.reactivex.Flowable;

/**
 * 契约类
 * Created by Zyh on 2016/12/3.
 */
public interface LoginContract  {
   public interface Model extends BaseModel {
       //进行网络请求的操作
       Flowable<ApiResult<User>> login(String name, String password);
    }
    public interface View extends BaseView{
        void isLoginSuccess(User user);
        void isFailure();
        void showMsg(String msg);
    }
    public abstract class Presenter extends BasePresenter<Model, View>{
        public abstract void login(String name,String password);
    }
}
